<?php

class Application_Model_Favorites_Ulubione extends Zend_Db_Table_Abstract {
     protected $_name = 'favorites';
     
     public function sprawdzUlubione($idfilmu,$iduzytk){
       $db = Zend_Db_Table::getDefaultAdapter();
     	$select = $db->select();
     	$select->from('favorites');
     	$select->where('iduser = ?',$iduzytk);
        $select->where('idmovie = ?',$idfilmu);
     	$ulub = $db->fetchAll($select);
     	return $ulub;
    }
    
    public function listaUlubione($iduzytk){
     	$db = Zend_Db_Table::getDefaultAdapter();
     	$select = $db->select();
     	$select->from('favorites');
     	$select->where('iduser = ?',$iduzytk);
     	$ulub = $db->fetchAll($select);
     	return $ulub;
     }
     
    
 }
